@use "../mixins/function" as *;

.todo {
  list-style: none;

  /* 自定义复选框样式 */
  .todo-checkbox {
    appearance: none; /* 移除默认样式 */
    width: 16px;
    height: 16px;
    border: 2px solid getCssVar("theme-color");
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    vertical-align: middle;
    cursor: pointer;

    /* 选中状态 */
    &:checked {
      background-color: getCssVar("theme-color");
      border-color: getCssVar("theme-color");
    }

    &:checked::after {
      content: "✓";
      position: absolute;
      top: 53%;
      left: 53%;
      transform: translate(-50%, -50%);
      color: #ffffff;
      font-size: 12px;
    }

    /* 禁用状态 */
    &:disabled {
      cursor: not-allowed;
      opacity: 0.9;
    }
  }
}
